﻿@model IEnumerable<PiscoSourDominio.Reserva>
@{
    ViewBag.Title = "Reservas del dia";
    
    WebGrid grid = new WebGrid(Model);
}

<H2 >  Listado de reservas del dia para atender</h2>
@grid.GetHtml(
    columns: grid.Columns(

                grid.Column(columnName: "IntReserva", header: "ID", style: "text-align-center"),

                grid.Column(header: "Nombres y Apellidos", format: (item) =>
                     new HtmlString(
                                 item.cliente.vchNombre + " " + item.cliente.vchApellido
                )), 
                
                grid.Column(columnName: "dtFecReserva", header: "Fecha de reserva",style: "text-align-center"),

                grid.Column(columnName: "intCantidadPersonas", header: "Comensales", style: "text-align-center"),

                grid.Column(columnName: "local.vchNombre", header: "Local ", style: "text-align-center"),

                grid.Column(header: "Acciones", format: (item) => 
                 new HtmlString( 
                       Html.ActionLink("Edit", "Edit", new { id = item.IntReserva } ).ToString()  + " " +
                           Html.ActionLink("Delete", "Delete", new { id = item.IntReserva }).ToString() 
                 ) 
            ) 

 ),
 
   tableStyle: "webgrid",
   headerStyle: "webgrid-header",
   footerStyle: "webgrid-footer",
   alternatingRowStyle: "webgrid-alternating-row",
   selectedRowStyle: "webgrid-selected-row",
   rowStyle: "webgrid-row-style")

   
 